package com.alibaba.algo.controller.user;

import com.alibaba.algo.cooperation.common.BaseResult;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 前端页面需要的一些信息
 */
@RestController
@RequestMapping(value = "/usercenter-admin-app/admin/pageInfo")
public class PageInfoController {

    @Value("${page.title:title}")
    private String title;

    @Value("${page.copyright:copyright}")
    private String copyright;

    @GetMapping("/get")
    public BaseResult get() {
        Map<String, String> map = new HashMap<>();
        map.put("title", title);
        map.put("copyright", copyright);
        return BaseResult.buildSuccess(map);
    }

}
